using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using LocalizationTest.Tools;

namespace LocalizationTest
{
  public class MapWithSingleLandmark : Map
  {
    public enum LandmarkIDs
    {
      centerLeftFlag,
      numberOfLandmarkIDs
    };

    private double[] xPositionOfLandmark;
    private double[] yPositionOfLandmark;

    public double[] XPositionOfLandmark
    {
      get { return xPositionOfLandmark; }
      set { xPositionOfLandmark = value; }
    }
    public double[] YPositionOfLandmark
    {
      get { return yPositionOfLandmark; }
      set { yPositionOfLandmark = value; }
    }

    public MapWithSingleLandmark()
    {
      xPositionOfLandmark = new double[(int)LandmarkIDs.numberOfLandmarkIDs];
      yPositionOfLandmark = new double[(int)LandmarkIDs.numberOfLandmarkIDs];
      xPositionOfLandmark[(int)LandmarkIDs.centerLeftFlag] = 0;
      yPositionOfLandmark[(int)LandmarkIDs.centerLeftFlag] = 200;
    }

    public override void Draw()
    {
      //coordinate system
      DebugDrawingTool.CreateLine("world:_map", new Vector2(-800, 0), new Vector2(800, 0), 3, Color.Gray);
      DebugDrawingTool.CreateLine("world:_map", new Vector2(0, -800), new Vector2(0, 800), 3, Color.Gray);

      //a colored circle for each landmark
      for (int i = 0; i < (int)LandmarkIDs.numberOfLandmarkIDs; i++)
      {
        Color color = Color.Green;
        DebugDrawingTool.CreateCircle("world:_map", new Vector2(xPositionOfLandmark[i], yPositionOfLandmark[i]), 10, 3, color);
        DebugDrawingTool.CreateLine("world:_map",
          new Vector2(xPositionOfLandmark[i] - 3, yPositionOfLandmark[i]),
          new Vector2(xPositionOfLandmark[i] + 3, yPositionOfLandmark[i]), 1, color);
        DebugDrawingTool.CreateLine("world:_map",
          new Vector2(xPositionOfLandmark[i], yPositionOfLandmark[i] - 3),
          new Vector2(xPositionOfLandmark[i], yPositionOfLandmark[i] + 3), 1, color);
      }
    }
  }
}
